import request from '@/utils/request'

/* 协调机制建立台账表 */
// 列表查询
const coordinationMechanismSetUpList = function (params = {}) {
  return request({
    url: '/zy-api/api/mechanism/findList',
    method: 'post',
    data: params
  })
}

// 新增
const addCoordinationMechanismSetUp = function (params = {}) {
  return request({
    url: '/zy-api/api/mechanism/insert',
    method: 'post',
    data: params
  })
}

// 修改
const editCoordinationMechanismSetUp = function (params = {}) {
  return request({
    url: '/zy-api/api/mechanism/update',
    method: 'post',
    data: params
  })
}

// 删除
const delCoordinationMechanismSetUp = function (params = {}) {
  return request({
    url: '/zy-api/api/mechanism/delete',
    method: 'post',
    data: params
  })
}

// 审核
const auditCoordinationMechanismSetUp = function (params = {}) {
  return request({
    url: '/zy-api/api/mechanism/review',
    method: 'post',
    data: params
  })
}

// 所在单位选项
const belongCompanyOptions = function (adCd) {
  return request({
    url: '/zy-api/api/mechanism/selectUnit',
    method: 'post',
    data: { adCd }
  })
}

// 党政职务选项
const governmentPostsOptions = function (adCd) {
  return request({
    url: '/zy-api/api/mechanism/selectJob',
    method: 'post',
    data: { adCd }
  })
}

export {
  coordinationMechanismSetUpList,
  addCoordinationMechanismSetUp,
  editCoordinationMechanismSetUp,
  delCoordinationMechanismSetUp,
  auditCoordinationMechanismSetUp,
  belongCompanyOptions,
  governmentPostsOptions
}